namespace SubhadraSolutions.Sharp.Logging.LogSubscribers.EventLog
{
    using SubhadraSolutions.Sharp.Logging.Contracts;
    using System.Diagnostics;

    public static class LogItemSeverityHelper
    {
        #region Methods

        public static EventLogEntryType Convert(LogItemSeverity severity)
        {
            if (severity == LogItemSeverity.DEBUG || severity == LogItemSeverity.INFO)
            {
                return EventLogEntryType.Information;
            }
            return severity == LogItemSeverity.WARN
                ? EventLogEntryType.Warning
                : EventLogEntryType.Error;
        }

        #endregion Methods
    }
}